package com.me.bbs.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 
 * </p>
 *
 * @author lm
 * @since 2023-01-09
 */
@ApiModel(value = "Comment对象", description = "")
@Data
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

     @TableId
    private Long commentId;

    private Long author;

    private Long post;

    @ApiModelProperty("0:父评论，1：子评论，2：回复子评论")
    private Byte type;

    private Long parentComment;
    private String content;
    private Long replyToSub;

    private Long forum;
    private Integer floor;
    private Integer likeCount;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createAt;

    @Override
    public String toString() {
        return "Comment{" +
            "commentId = " + commentId +
            ", author = " + author +
            ", post = " + post +
            ", type = " + type +
            ", parentComment = " + parentComment +
            ", replyToSub = " + replyToSub +
            ", forum = " + forum +
            ", likeCount = " + likeCount +
        "}";
    }
}
